The invention relates to novel N-benzylpiperidine and - tetrahydropyridine derivatives of formula (I), 
wherein
X stands for hydroxyl group, halogen or Rxe2x80x94SO3-group, wherein R means an optionally substituted alkyl or aryl group;
each of A and B represents hydrogen or, when taken together, they can form a valence bond,
as well as to cis and trans isomers, optically active enantiomers and racemates thereof and the salts of these compounds.
The novel compounds of the invention are valuable intermediates for paroxetine [chemically (xe2x88x92)-trans-4-(4-fluorophenyl)-3-(3,4-methylenedioxyphenoxymethyl)piperidine hydrochloride hemihydrate], a drug having antidepressive effect.
Furthermore, the invention relates also to a process for the preparation of the novel compounds of formula (I), wherein X, R, A and B are as defined above, as well as cis and trans isomers, optically active enantiomers and racemates thereof and the salts of these compounds; as well as to the use of these substances for the preparation of paroxetine of formula (V). 
The process according to the invention comprises reacting a tetrahydropyridine derivative of formula (II) 
with formaldehyde in an acidic medium to obtain a novel racemic compound of formula (I), wherein X stands for hydroxyl group, and A together with B means a valence bond.
If desired, after transformation to an acid addition salt and/or resolution, the thus prepared compound is reduced and following the reduction, if desired, after transformation to an acid addition salt and/or after resolution, the obtained cis or trans, racemic or optically active novel compound of formula (I)xe2x80x94wherein X stands for hydroxyl group, and each of A and B represents hydrogenxe2x80x94is reacted with a compound of formula (III)
Rxe2x80x94SO2xe2x80x94Yxe2x80x83xe2x80x83(III)
or formula (IV) 
wherein R is as defined above and Y stands for halogen; the thus formed novel cis of trans, racemic or optically active compound of formula (I)xe2x80x94wherein X means halogen or Rxe2x80x94SO3-group, wherein R is as defined above, and each of A and B stands for hydrogenxe2x80x94is transformed, if desired, to an acid addition salt and/or resolved.
The compound of formula (II) used as starting substance according to our invention, is known and can be prepared similarly to those described in: J. Org. Chem. 12, 894 (1947); or in the Dutch is patent specification No. 6 551 0107.
In the process according to the invention, the starting substance of formula (II) is prepared from N-benzylpiperidone and 4-fluorophenyl magnesium bromide, which are easily available on industrial (large) scales, too.
4-(4-Fluorophenyl)-N-benzyl-1,2,5,6-tetrahydropyridine of formula (II) is transformed with formaldehyde in acidic medium via the Prins reaction to result in a racemic compound of formula (I), wherein X stands for hydroxyl group, and A and B together mean a valence bond. This compound is new, unknown in the literature.
The reaction is preferably carried out by reacting the starting substance with formaldehyde in 45 to 65% aqueous sulfuric acid containing also 1 to 5 molar equivalents of hydrochloric acid at a temperature between 70xc2x0 C. and 90xc2x0 C. for 1-2 hours and then isolating the product in the form of its tosylate salt. The new compound of formula (I), wherein X, A and B are as defined above, is an N-benzyltetrahydropyridine derivative, the tosylate salt of which can be isolated with a good efficiency, in a very pure state, in a well-filtrable crystal form.
If desired, the above racemic compound of formula (I)xe2x80x94wherein X means hydroxyl group, and A and B together mean a valence bondxe2x80x94is resolved by using an optically active acid, preferably dibenzoyltartaric acid. The subsequent reaction steps can be continued either with racemic or optically active compounds of formula (I).
In the next step of the process according to our invention, the racemate or optically active form of the novel N-benzyltetrahydropyridine derivativexe2x80x94wherein X stands for hydroxyl group, A and B together mean a valence bondxe2x80x94is reduced to the corresponding novel, racemic cis or trans, or optically active cis or trans N-benzylpiperidine derivative of formula (I), wherein X means hydroxyl group, and each of A and B stands for hydrogen. Trans stereoisomers are formed by reaction of lithium aluminium hydride, but cis stereoisomers are obtained by catalitic hydrogenation. Optically active starting substances give optically active products, whereas racemic products are obtained from racemic starting substances. If desired, a racemic cis product is resolved by employing an optically active acid, advantagenously dibenzoyltartaric acid.
When carrying out the reduction by lithium aluminium hydride, an aprotic solvent, e.g. tetrahydrofuran is used together with 2 to 5 molar equivalents of the reducing agent. The racemic or optically active, respectively trans compounds of formula (I)xe2x80x94wherein X means hydroxyl group, and each of A and B represents hydrogenxe2x80x94are new, unknown in the literature, which are isolated from the reaction mixture as bases or in the form of a salt after decomposition of the reducing agent.
When the reduction is performed by catalytic hydrogenation, either the base or salt form of the starting substance is treated with hydrogen in water or in a nonaqueous medium or in a mixture of solvents, in the presence of (a) catalyst(s) commonly used for the saturation of carbon-carbon double bonds. The saturation of the double bond is nearly selective by using e.g. palladium-on-carbon at room temperature under atmospheric pressure. However, a partial debenzylation also occurs by employing a higher temperature, pressure and greater amount of a catalyst. When a debenzylation occurs, a quantitative re-benzylation can be carried out by a simple reaction. The obtained racemic or optically active, respectively cis compounds of formula (I)xe2x80x94wherein X means hydroxyl group, and each of A and B stands for hydrogenxe2x80x94are obtained from the reaction mixture in the form of a base or salt, preferably as dibenzoyltartarate after removing the catalyst by filtration. An optically active starting compound leads to an optically active product whereas a racemic product is obtained from a racemic starting substance, which is resolved e.g. by using dibenzoyltartaric acid to result in the aimed (+)-cis enantiomer. The cis racemic or optically active compounds, respectively of formula (I)xe2x80x94wherein X, A and B are as defined abovexe2x80x94are similarly unknown in the literature.
The racemic cis or trans and optically active cis or trans compounds of formula (I)xe2x80x94wherein X means hydroxyl group, and each of A and B stands for hydrogenxe2x80x94are made even more useful for participating at subsequent (other) condensation reactions by transforming the above hydroxymethyl compounds to racemic cis or trans or optically active, respectively cis or trans compounds of formula (I)xe2x80x94wherein X stands for halogen or Rxe2x80x94SO3- group, wherein R means an optionally substitued alkyl or aryl group, and each of A and B represents hydrogen. These latter compounds of formula (I) contain an easily cleavable leaving group and therefore, they are particularly useful to prepare phenol ether type compounds. It was found that compounds of this type can be transformed in an inert (indifferent) solvent (such as a chlorohydrocarbon) at room temperature, in the presence or absence of an acid binding agent, very rapidly and quantitatively with compounds of formula (III)xe2x80x94wherein Y means a halogen, R is as defined above, e.g. C1-4alkil, phenyl or tolyl groupxe2x80x94such as methanesulfonyl chloride, benzenesulfonyl chloride, p-toluenesulfonyl chloride or with a compound of formula (IV), wherein Y is as defined above, to give compounds of formula (I), wherein X, R, Y, A and B are as defined above. These compounds are similarly unknown in the literature.
The configuration of compound of formula (I)xe2x80x94wherein X means hydroxyl group, and each of A and B stands for hydrogenxe2x80x94is not changed in their reaction with the reagents (reactants) of formula (III) or (IV): i.e. cis compounds are obtained from cis substances, whereas trans substances lead to trans compounds.
After or without isolation, these novel compounds, prepared by using the process according to the invention, can very advantagenously be employed (utilized) for the preparation of racemic or optically active trans-1-benzyl-4-(4-fluorophenyl)-3-(3,4-methylenedioxyphenoxymet-hyl)piperidine [abbreviated: N-benzylparoxetine] compounds. Paroxetine can be synthetized by catalytic debenzylation of N-benzylparoxetine or its acid addition salt; after resolution of the obtained compound or its salt, the base is liberated from the optically active salt formed, or the base is directly converted to hydrochloride hemihydrate.
The above methods are very useful to prepare paroxetine on large/industrial scales in a simple way.